#!/usr/bin/env python3
import re

count = 0
pt = re.compile('sbin')

f = open('passwd')
for i in f:
    if pt.search(i):
        count += 1

f.close()
print('有 {0} 行包含 sbin 字符串'.format(count))
